<html>
<head>
<link href="../style/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<p class="heading">
Gamelib library example index...
</p>

<p>
These examples each demonstrate a part of the gamelib library. It's modular in design, so you only link
in the parts you require for a page. Since you're linking in the javascript code, pages using the
library will load faster than those with inline code as the browser will load the scripts from
the cache!
</p>
<p>
These examples have a lot of comments and explanations within the example scripts themselves, and
in the <a href="gamelib.zip">gamelib.zip</a> file there are full docs for each module, listing all
relevent properties and methods as well as several global functions not mentioned here. This library is
constantly being updated and improved and should lead to a very useful API for budding game programmers
or anyone wishing to add dynamic content to their sites, quickly and easily!
</p>

<table>
<tr><td width=50% valign=top align=left>
<a href="cookie_example.html">Cookie Example</a><br>
This example demonstrates the ease with which you can use cookies to save
data between pages and browser sessions. This example counts the times you've
visited a site.
</td>

<td width=50% valign=top align=left>
<a href="cookie_example_2.html">Cookie Example 2</a><br>
Another cookie example. This one remembers your name between visits
</td></tr>

<tr><td width=50% valign=top align=left>
<a href="layer_example.html">Layer Example</a><br>
This is a demonstration of layer creation and manipulation. Although not game specific,
layers are incredibly useful, so much so that they are actually part of gamelib's core
library. Layers can load external content, be dragged and dropped, trigger mouse events
and much more!
</td>

<td width=50% valign=top align=left>
<a href="layer_example_2.html">Layer Example 2</a><br>
An example of a layer following a sprite around. You can set layers to follow
either a sprite or the mouse, so popups or speech bubbles are simple! This layer
has its background set to an image and has also been resized, showing various
methods...
</td></tr>


<tr><td width=50% valign=top align=left>
<a href="mouse_example.html">Mouse Example</a><br>
The mouse object is used to track the mouse pointer, as well as opening up a range of
extra features with layers and sprites. Using this object, you can drag and drop elements,
as well as trigger various events. This demonstration shows these techniques with a group
of sprites.
</td>

<td width=50% valign=top align=left>
<a href="sound_example.html">Sound Example</a><br>
A bit of a murky area, the sound object and its methods should allow easy manipulation
of sound. It's simplified for games use, and works well with Internet Explorer 4/5, and
with Netscape 4 depending on the Plugin. This example triggers sounds when you press buttons
(which are actually sprites masquarading as buttons :)
</td></tr>

<tr><td width=50% valign=top align=left>
<a href="sprite_example.html">Sprite Example</a><br>
Sprites are the central feature of Gamelib. These are game objects which move around
and animate under timer control. They are incredibly easy to use, but offer a lot of
power for games, reporting collisions themselves, responding to the mouse, having speed, zoom size
and direction and many other properties and methods. Anyone writing a game that uses
sprites will find things a lot easier using Gamelib, especially since the library allows
other functions to be "hooked" into the central animation loop, keeping things synchronized!
This example demonstrates collision.
</td>

<td width=50% valign=top align=left>
<a href="sprite_example_2.html">Sprite Example 2</a><br>
Another example of sprite use. The one demonstrates the canvas animation technique. The gamelib
sprites can be animated by storing all stages of animation on ONE image, which is faster for downloading,
smoother for animation and easier for updating (only one image, instead of lots for a game)
</td></tr>

<tr><td width=50% valign=top align=left>
<a href="sprite_example_3.html">Sprite Example 3</a><br>
This example demonstrates the follow and target methods for sprites, as well as the new hitEvent property.
Basically, any sprite can now follow another sprite or the mouse, much like the layer objects. Also
sprites can target another sprite or the mouse, which means they home in on the target object. The new
hitEvents are events that will fire when a sprite hits another sprite. You can set different events
based on which sprites hit which, so for example if sprite a hits b, it fires an event, if sprite
a hits c, it fires another event and so on. Think of them like mouse events, the sprite does the thinking
for you!
</td>

<td width=50% valign=top align=left>
<a href="keyboard_example.html">Keyboard Example</a><br>
Here the gamelib is used to provide keyboard objects, in this case to render a very
simple bat and ball game. The Gamelib is optimized for multiple key presses at once,
as there is likely to be in a game situation.
</td></tr>
</table>
<p>
<a href="gamelib.zip">Download Gamelib.zip</a><br>
Click the link above to download Gamelib. It's completely free to use in non-commercial
pages and games, but please include a link back to <a href="http://www.javascript-games.org" target="_top">Javascript Games</a>
on your site if you use it! Do not redistribute Gamelib from your own site, just include a link to <a href="http://www.javascript-games.org/gamelib/gamelib.zip">http://www.javascript-games.org/gamelib/gamelib.zip</a>
where the latest version of the library will always be placed.
</p>
<p>
<em>
Gamelib was created by and is maintained by <a href="mailto:scott@javascript-games.org">Scott Porter</a>.
</em>
</p>
</body>
</html>